# include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
include_directories( ${bengine_INCLUDES} )
# TARGET_LINK_LIBRARIES( critterding utils )

add_subdirectory(math)
add_subdirectory(gl)
add_subdirectory(scenes/critterding)
add_subdirectory(utils)
add_subdirectory(gui)
add_subdirectory(brainz)
add_subdirectory(scenes/stuntcoureur)
add_subdirectory(graphics)
add_subdirectory(filesystem)
add_subdirectory(common)
add_subdirectory(net)
add_subdirectory(physics)

########### next target ###############

set(critterding_SRCS critterding.cpp)

add_executable(critterding ${critterding_SRCS})
TARGET_LINK_LIBRARIES ( critterding sccritterding ${bengine_LIBS} ${bengine_WIN32LIBS})
# gl cdentities cdgui modes 
# install(TARGETS critterding ${INSTALL_TARGETS_DEFAULT_ARGS})


# ########### next target ###############

set(stuntcoureur_SRCS stuntcoureur.cpp)

add_executable(stuntcoureur ${stuntcoureur_SRCS})

TARGET_LINK_LIBRARIES ( stuntcoureur stscene ${bengine_LIBS} ${bengine_WIN32LIBS})

# install(TARGETS stuntcoureur ${INSTALL_TARGETS_DEFAULT_ARGS})


# ########### next target ###############
# 
# set(empty_SRCS empty.cpp)
# 
# add_executable(empty ${empty_SRCS})
# 
# target_link_libraries(empty ${KDE4_KDECORE_LIBS} gl scene gui utils entities math gui bulletmath bulletmultithreaded)
# 
# install(TARGETS empty ${INSTALL_TARGETS_DEFAULT_ARGS})
# 
# 
# ########### install files ###############




#original Makefile.am contents follow:

#bin_PROGRAMS = critterding stuntcoureur empty
#
## set the include path found by configure
#INCLUDES = $(all_includes) -I./utils/bullet
#
## the library search path.
#
#SUBDIRS = math gl utils gui brainz scenes/critterding scenes/stuntcoureur scenes/empty @OPENCL_LOCALDIR@
#
#critterding_SOURCES = critterding.cpp
#critterding_LDADD =	$(top_builddir)/src/gl/libgl.la \
#			$(top_builddir)/src/scenes/critterding/libcritterding.la \
#			$(top_builddir)/src/utils/libutils.la \
#			$(top_builddir)/src/math/libmath.la \
#			$(top_builddir)/src/gui/libgui.la \
#			$(top_builddir)/src/utils/bullet/libbulletmath.la \
#			$(top_builddir)/src/utils/bullet/libbulletmultithreaded.la \
#			@OPENCL_LA@ \
#			$(HOST_LIBS)
## -lGL -lfreetype -lSDL -lBulletDynamics -lBulletCollision -lLinearMath -lftgl
#critterding_LDFLAGS = -avoid-version -no-undefined -fopenmp
#
#
#
#
#
#
#stuntcoureur_SOURCES = stuntcoureur.cpp
#stuntcoureur_LDADD =	$(top_builddir)/src/gl/libgl.la \
#			$(top_builddir)/src/scenes/stuntcoureur/libscene.la \
#			$(top_builddir)/src/scenes/stuntcoureur/gui/libgui.la \
#			$(top_builddir)/src/scenes/stuntcoureur/entities/libentities.la \
#			$(top_builddir)/src/scenes/stuntcoureur/entities/body/libbody.la \
#			$(top_builddir)/src/scenes/stuntcoureur/utils/libutils.la \
#			$(top_builddir)/src/utils/libutils.la \
#			$(top_builddir)/src/math/libmath.la \
#			$(top_builddir)/src/gui/libgui.la \
#			$(top_builddir)/src/utils/bullet/libbulletmath.la \
#			$(top_builddir)/src/utils/bullet/libbulletmultithreaded.la \
#			$(top_builddir)/src/utils/bullet/libbulletdynamics.la \
#			$(top_builddir)/src/utils/bullet/libbulletcollision.la \
#			$(top_builddir)/src/utils/bullet/libbulletsoftbody.la \
#			@OPENCL_LA@ \
#			$(HOST_LIBS) -lpng -lSDL_net
#stuntcoureur_LDFLAGS = -avoid-version -no-undefined
#
#
#empty_SOURCES = empty.cpp
#empty_LDADD =		$(top_builddir)/src/gl/libgl.la \
#			$(top_builddir)/src/scenes/empty/libscene.la \
#			$(top_builddir)/src/scenes/empty/gui/libgui.la \
#			$(top_builddir)/src/scenes/empty/utils/libutils.la \
#			$(top_builddir)/src/scenes/empty/entities/libentities.la \
#			$(top_builddir)/src/utils/libutils.la \
#			$(top_builddir)/src/math/libmath.la \
#			$(top_builddir)/src/gui/libgui.la \
#			$(top_builddir)/src/utils/bullet/libbulletmath.la \
#			$(top_builddir)/src/utils/bullet/libbulletmultithreaded.la \
#			@OPENCL_LA@ \
#			$(HOST_LIBS)
#empty_LDFLAGS = -avoid-version -no-undefined
#
